package com.zhi.mbtibot.exception;

import com.zhi.mbtibot.common.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 功能:全局异常设置
 * 作者:YukiSu
 * 日期:2024/7/21 4:07
 */
@ControllerAdvice
public class GlobalException {
    @ExceptionHandler(TokenAuthExpiredException.class)
    @ResponseBody
    public Result tokenAuthExpiredException(TokenAuthExpiredException e) {
        return Result.error("token出错");
    }
}